package com.unnamed.b.atv.sample;

import com.unnamed.b.atv.utils.Util;
import junit.framework.Assert;
import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class ExampleOhosTest {
    @Test
    public void testBundleName() {
        final String actualBundleName = AbilityDelegatorRegistry.getArguments().getTestBundleName();
        assertEquals("com.unnamed.b.atv.sample", actualBundleName);
    }
    @Test
    public void testUtilsIsEmpty() {
        boolean isEmpty = Util.isEmpty("123");
        Assert.assertNotNull(isEmpty);
        assertEquals(false, isEmpty);
    }

    @Test
    public void testUtilsIsEmpty2() {
        String str = null;
        boolean isEmpty = Util.isEmpty(str);
        Assert.assertNotNull(isEmpty);
        assertEquals(true, isEmpty);
    }

    @Test
    public void testUtilsIsEmpty3() {
        String str = "";
        boolean isEmpty = Util.isEmpty(str);
        Assert.assertNotNull(isEmpty);
        assertEquals(true, isEmpty);
    }

    @Test
    public void testUtilsIsNotEmpty() {
        String str = null;
        boolean isEmpty = Util.isNotEmpty(str);
        Assert.assertNotNull(isEmpty);
        assertEquals(false, isEmpty);
    }

    @Test
    public void testUtilsIsNotEmpty2() {
        String str = "";
        boolean isEmpty = Util.isNotEmpty(str);
        Assert.assertNotNull(isEmpty);
        assertEquals(false, isEmpty);
    }

    @Test
    public void testStringUtilsIsNotEmpty3() {
        String str = "123";
        boolean isEmpty = Util.isNotEmpty(str);
        Assert.assertNotNull(isEmpty);
        assertEquals(true, isEmpty);
    }
}